﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using MyDes;
public partial class single_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        //首先将用户名DES加密
        string s = "测试登陆控件";
        LoginStatus1.Visible = true;
        LoginName1.Width = 1233;
        LoginView1.Visible = true;

        My_Des zxdDes = new My_Des();
        string zxdstr = "JYHD" + "JYHD018553";
        zxdDes.EncryptStr = zxdstr;
        zxdDes.MyDesKey = "tiger11!";
        zxdDes.DesEncrypt();
        zxdstr = zxdDes.MyDesStr;
        //将加密字符串传送给远程教育网
        //传送前预处理
        zxdstr=zxdstr.Replace("#", ",07baby01,");
        zxdstr = zxdstr.Replace("&", ",07baby02,");
        zxdstr = zxdstr.Replace("+", ",07baby03,");
        string zxdpurl0 = "singlelgn.aspx?zid="+zxdstr;
        //实际使用形式为：string zxdpurl0 = "http://www.zxuexi.net/singlelgn.aspx?zid='"+zxdstr+"'";
        Response.Redirect(zxdpurl0);
        
    }
}
